package com.template.app.editor;

import java.beans.PropertyEditorSupport;
import java.util.Date;

import org.springframework.util.StringUtils;

public class DateEditor extends PropertyEditorSupport {

	@Override
	public void setAsText(String milliseconds) throws IllegalArgumentException {
		setValue(new Date(Long.valueOf(StringUtils.trimAllWhitespace(milliseconds))));//TODO tratar
	}
	
	@Override
	public String getAsText() {
		Date date = (Date) getValue();//TODO
		return super.getAsText();
	}
}
